﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ORM.Business.Feedbacks;
using ORM.Business.Models;
using ORM.Business.Models.Entities;

namespace ORM.Business.Interfaces
{
    public interface IQuestionRepository
    {
        QuestionListFeedback GetAllQuestions();
        QuestionListFeedback GetSimilarQuestions(int modelId, string stringToSearch);
        QuestionListFeedback GetAllQuestion(PageInfo pageInfo, int deviceId, int manufacturerId, int modelId, string stringToSearch);
        QuestionListFeedback GetUnansweredQuestion(PageInfo pageInfo, int deviceId, int manufacturerId, int modelId, string stringToSearch);
        QuestionListFeedback GetHelpfulQuestion(PageInfo pageInfo, int deviceId, int manufacturerId, int modelId, string stringToSearch);
        QuestionListFeedback GetResolvedQuestion(PageInfo pageInfo, int deviceId, int manufacturerId, int modelId, string stringToSearch);
        QuestionListFeedback GetUnresolvedQuestion(PageInfo pageInfo, int deviceId, int manufacturerId, int modelId, string stringToSearch);
        QuestionListFeedback GetQuestionBookmarks(int userId, PageInfo pageInfo);
        Feedback<IList<Question>> GetQuestionBookmarks(int userId);
        Feedback<Question> InsertQuestion(Question question);
        Feedback<Question> UpdateQuestion(Question question);
        Feedback<Question> VoteQuestion(int questionId, int userId);
        Feedback<Question> ReportQuestion(int questionId, string reason, int userId);
        Feedback<Question> AddBookmarkAnQuestion(int questionId, int userId);
        Feedback<Question> MarkQuestionAsResolved(int questionId);
        Feedback<Question> DeleteAnAnswer(int questionId);
        bool CheckIfAnUserCanAcceptAnswerForAQuestion(int questionId, int userId);
        Feedback<IList<Question>> GetAllReportedQuestion(int minReportNumber);
        Feedback<IList<ReportedQuestion>> GetReportedQuestionDetails(int id);
        Feedback DeleteQuestion(int id);
        Feedback DeleteReportedQuestion(int id);
        Feedback DeleteFalseReports(int id);
        Feedback<IList<Question>> GetTopNewQuestions();
    }
}